//
//  MSTableViewController.h
//  Musou
//  A TableView controller that contains ability of pulling down to refresh
//  and tapping loading cell to load more
//
//  Created by luo danal on 5/2/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MSPullingRefreshTableView.h"
#import "MSLoadingCell.h"

@interface MSLoadingTableViewController : UIViewController <
UITableViewDataSource,
UITableViewDelegate,
MSPullingRefreshTableViewDelegate,
MSLoadingCellDelegate
>

@property (retain,nonatomic) MSPullingRefreshTableView *tableView;
@property (retain,nonatomic) NSMutableArray *dataList;
@property (retain,nonatomic) NSMutableArray *heightList;
@property (assign, nonatomic) NSInteger page;
@property (nonatomic) CGPoint offset;
@property (readonly, nonatomic) BOOL refresh;
@property (nonatomic) BOOL isAutoLoadingCell;

- (CGFloat)heightForIndexPath:(NSIndexPath *)indexPath;
- (void)configCell:(UITableViewCell **)cell 
       atIndexPath:(NSIndexPath *)indexPath
    reuseIdentifier:(NSString *)identifier;

- (void)loadData:(BOOL)refresh;
- (void)finishLoading:(BOOL)refresh;

@end
